forked from Sascha-T/create-computing
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push to v1.0.0-pre2.
- Loading branch information
Showing
17 changed files
with
747 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"meta":{"format_version":"4.0","model_format":"java_block","box_uv":false},"name":"computerized_redstone_link","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"resolution":{"width":16,"height":16},"elements":[{"name":"box","rescale":false,"locked":false,"from":[1,0,1],"to":[15,2,15],"autouv":0,"color":4,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,14,2],"texture":1},"east":{"uv":[0,0,14,2],"texture":1},"south":{"uv":[0,0,14,2],"texture":1},"west":{"uv":[0,0,14,2],"texture":1},"up":{"uv":[1,1,15,15],"texture":2},"down":{"uv":[1,1,15,15],"texture":2}},"type":"cube","uuid":"6ab9df4b-2d79-ae67-a995-d407e4b7d2c7"},{"name":"stick","rescale":false,"locked":false,"from":[2,2,2],"to":[3,10,3],"autouv":0,"color":5,"origin":[0,0,0],"faces":{"north":{"uv":[1,2,2,10],"texture":3},"east":{"uv":[1,2,2,10],"texture":3},"south":{"uv":[1,2,2,10],"texture":3},"west":{"uv":[1,2,2,10],"texture":3},"up":{"uv":[2,1,3,2],"texture":3},"down":{"uv":[0,0,1,1]}},"type":"cube","uuid":"d08ca785-2762-01f9-742b-8dee066d3e84"},{"name":"dish","rescale":false,"locked":false,"from":[0,9,0],"to":[5,9,5],"autouv":0,"color":5,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,5,0]},"east":{"uv":[0,0,5,0]},"south":{"uv":[0,0,5,0]},"west":{"uv":[0,0,5,0]},"up":{"uv":[4,0,9,5],"texture":3},"down":{"uv":[4,0,9,5],"texture":3}},"type":"cube","uuid":"4c22dbfc-d5b2-89e8-f050-ee0047022709"},{"name":"stick","rescale":false,"locked":false,"from":[8,2,2],"to":[9,10,3],"autouv":0,"color":5,"origin":[0,0,0],"faces":{"north":{"uv":[1,2,2,10],"texture":3},"east":{"uv":[1,2,2,10],"texture":3},"south":{"uv":[1,2,2,10],"texture":3},"west":{"uv":[1,2,2,10],"texture":3},"up":{"uv":[2,1,3,2],"texture":3},"down":{"uv":[0,0,1,1]}},"type":"cube","uuid":"fc51e6f3-164e-1115-fdb5-73e905ba937c"},{"name":"cube","rescale":false,"locked":false,"from":[2,-1,2],"to":[14,0,14],"autouv":0,"color":7,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,12,1],"texture":4},"east":{"uv":[0,0,12,1],"texture":4},"south":{"uv":[0,0,12,1],"texture":4},"west":{"uv":[0,0,12,1],"texture":4},"up":{"uv":[0,0,12,12]},"down":{"uv":[0,0,10,10],"texture":4}},"type":"cube","uuid":"c54fec1f-a187-289c-d9ed-f15e8c0cd0a8"}],"outliner":[{"name":"antenna 1","origin":[0,0,0],"color":0,"nbt":"{}","armAnimationEnabled":false,"uuid":"388bde65-fb8b-a828-9d4c-843c267ea8da","export":true,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["fc51e6f3-164e-1115-fdb5-73e905ba937c","c54fec1f-a187-289c-d9ed-f15e8c0cd0a8"]},{"name":"antenna 1","origin":[0,0,0],"color":0,"nbt":"{}","armAnimationEnabled":false,"uuid":"8466190f-aa1e-0ffe-a0a8-ffe184a60eae","export":true,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["d08ca785-2762-01f9-742b-8dee066d3e84","4c22dbfc-d5b2-89e8-f050-ee0047022709"]},{"name":"VoxelShapes","origin":[0,0,0],"color":0,"nbt":"{}","armAnimationEnabled":false,"uuid":"45700195-9ab4-e25e-ca62-33988cc74b7d","export":true,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["6ab9df4b-2d79-ae67-a995-d407e4b7d2c7"]}],"textures":[{"path":"C:\\Users\\sasch\\Downloads\\Create-mc1.18-dev\\src\\main\\resources\\assets\\create\\textures\\block\\brass_casing_inner.png","name":"brass_casing_inner.png","folder":"block","namespace":"create","id":"0","particle":true,"render_mode":"default","visible":true,"mode":"bitmap","saved":true,"uuid":"5ee7dca0-8235-14e5-d9e7-f667bf2f9d55","relative_path":"../../../../Users/sasch/Downloads/Create-mc1.18-dev/src/main/resources/assets/create/textures/block/brass_casing_inner.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAT9JREFUOE91Uz1PwzAQPTchkVKpCKQCP6BDJSSQGBmYWDrx/39DJ4oaKaldo3fJs+wL3BKfe7bfV93h9THKXP0QpGsr7b7Po9yuG/4kF3/V9U290jW+KPexv9cLTr2Xrqmkrp14H6Ufg2y6WofQY5/FHl9HBHixa6cDLL5SbJrGHV4eYlOt5Pgz6AU41FRORn+VS4hFj7kJt8gYos79iWDdVjqAInfy517S4H13p5PkjjX4Q48krunzWff19pRcwAFC4+HzEKQfvGw3bcF+QcEKldtGgQm7sPHzeZsQWI/JFwhyh/I5FRFq2gL0pMF8AcS15SgihWNgEBKKy5DlAnNuISJfoI3WStDJIz7lIEYNTe61NvM+cwHxqAfppCDl3KwmQENXeMEiSFYcG6b/QlW4QOUB73ia/huEagPGC38BXLrHrPBkj80AAAAASUVORK5CYII="},{"path":"C:\\Users\\sasch\\Downloads\\Create-mc1.18-dev\\src\\main\\resources\\assets\\create\\textures\\block\\brass_casing_side.png","name":"brass_casing_side.png","folder":"block","namespace":"create","id":"1","particle":false,"render_mode":"default","visible":true,"mode":"bitmap","saved":true,"uuid":"82c1f331-ef7e-60bc-0d92-b5b64210cd0a","relative_path":"../../../../Users/sasch/Downloads/Create-mc1.18-dev/src/main/resources/assets/create/textures/block/brass_casing_side.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAWZJREFUOE+dUsFKw0AQnUnTtEnFWqFYCt7soRQRBEE89OBNEDzofwie/AC/wA/xu4QKtZU2zSbtypsw6Sa0HpzL7s57OzvvzfLr07mNKCVEI/RlrUYSZzvxaczEH29jC3QwOhXS7PO7uN/uHZXOq2X+EGIer2Tl20HLphuiukfkB15ByMyGkEeEzW1eCcC/fgzxw2VPOjBrWSSCGpdUAFuYlFpBvcCmsck7uLs4se4FACAicKkabpHJPCG+OevYpVkLLwpqsuLs7pMs19LwParuRQK0T2Yr6rabpQerOehWqeiuEwZlCa5WELLUkl/nQtIub3g8PBb3VJtr5mxhqHvYKLpyX9ckD/sHUgD61Ad4oFqVqHiVU3gAwNUYhbmh+wJcTEwKoLV9s9cCkKh/QccLj/jxum+r7rqv6p/QnF7GBKQD14Nds1d/gOl/cf3h9+er7R/+U3UZXC6YopYlfrkf/auAlvsFFk/Rq3UFaSMAAAAASUVORK5CYII="},{"path":"C:\\Users\\sasch\\Downloads\\Create-mc1.18-dev\\src\\main\\resources\\assets\\create\\textures\\block\\brass_casing.png","name":"brass_casing.png","folder":"block","namespace":"create","id":"2","particle":false,"render_mode":"default","visible":true,"mode":"bitmap","saved":true,"uuid":"7b89993d-b0bf-324e-b069-b035682425fc","relative_path":"../../../../Users/sasch/Downloads/Create-mc1.18-dev/src/main/resources/assets/create/textures/block/brass_casing.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAZFJREFUOE+VUr9Lw0AUfpekKW2wVlARHEQLWqhCwX9DF+0gDuLi4CoOzp0d3ARdXAQX/5eCFapDdZR2MK0maX715F14ySUGwW95ebl3333fd8cuWlu8DD4giiVN1CxcJ8hd/3QYsHarzlfrVWhu18TQ6MOM988uVVP9xI4OQoydCXQ7g4hgs7kI7ZuOWCjrqqhagUHgc1GzwP/nx1u/CVbmy+CFHHSVgRdMwQ85FDQl7nVVEVzDLxdODzbgrWcCwwwadQOuH15goVJMCEIuhv1gGgtAMoTl+XCyvw7PPSshuH18FZIRthfGVvJ6/He0V4P3vptkcHn3lFJAx5IlOYfh2BUEg/53QnB13wVDL8RzJB1ly99k4XB3LSKgDNACEuAwec2mT0S2GyQWZIK5kh7vsdwQjGJ0pQjZClkQGci3QPePlQKldyAHXDE0QAupEDEDWQGeSMB3gYrI2sjy8kPUFTXtn3PxmBBiM+egawrkWsAQCSQ3G6Lcp95BdXnmr9ncNdtiYJoOsLOdRmL23zQAP2aU7p+Dky3/AAAAAElFTkSuQmCC"},{"path":"C:\\Users\\sasch\\Downloads\\Create-mc1.18-dev\\src\\main\\resources\\assets\\create\\textures\\block\\redstone_antenna_powered.png","name":"redstone_antenna_powered.png","folder":"block","namespace":"create","id":"3","particle":false,"render_mode":"default","visible":true,"mode":"bitmap","saved":true,"uuid":"1ecdeba7-eef3-c37d-78bd-aadd28c24765","relative_path":"../../../../Users/sasch/Downloads/Create-mc1.18-dev/src/main/resources/assets/create/textures/block/redstone_antenna_powered.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAARxJREFUOE9jZGBgYPjLwPCfmYGBEcQGgYcPH/7/8uULmK2trQ0Xr62t/d/c3Azng+QZQZr/r4hnYIxYyAAyBKT574d3DF9uX2P4IyrFwC4iBjYEpLm+vp6hsbGRAdkQsGnrGRj+B0JdcO3ixf9f7t9i4Hz7kuE/vyDDJwl5BhsbG7C6pKSk//PmzUN1AUgiN9zs/+SVp8ASV69e/f/zzSuGP+/fMLAIijB8Y2aFG4CsDuZdsCYnU6X/+07fg5sMMuTjmzcM/5iZ4ZqxqQOHAYgIddX7v3r3JRSnwWxAprGpo44Btgay/w9feEzQBdjUgTVZ60n/P3rpKUEDsKkDazLXEv9/8tpLggZgU0dQE7bARBYbNQApCxMKLFzyAAsqgBGiwxhuAAAAAElFTkSuQmCC"},{"path":"C:\\Users\\sasch\\Downloads\\Create-mc1.18-dev\\src\\main\\resources\\assets\\create\\textures\\block\\filtered_detector_front.png","name":"filtered_detector_front.png","folder":"block","namespace":"create","id":"4","particle":false,"render_mode":"default","visible":true,"mode":"bitmap","saved":true,"uuid":"7e722d7e-ec58-46ac-43f0-f6b09c2de9d0","relative_path":"../../../../Users/sasch/Downloads/Create-mc1.18-dev/src/main/resources/assets/create/textures/block/filtered_detector_front.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAR9JREFUOE/tUrGKg0AQfaazEwRbQbC2EGs7sRJsQ/BH0t5fXCchOYSDu07srMVCSCcItoIgpLD0mOHWxJxHSJ9pdnZ25u2beSMlSTIBgKIodEBVVfR9zycZ+ffmeZ4kYhIBBEHA93EcF7nDMDBwURQcdxyH/QVAlmUTPcRxDE3TIMvyDNK2LaIoQtM0HDMMg33btq8MyrKc6CFNU3xvt3PxBcDueITv+/wrtUR5qwxM00RVVfgIQ1AhWbuZ8Pb5BcuyUNc1xyiP/EULgkGe53gPwyv9XwDXdZk2DZNafdjCecOisO0Pp8ctCAY0RF3X52JSpOs6kEJEW8zgXwZUKWS71/1WxlUAsThrS/Nni4DlENcSnonNC/FM0W3uCwD4AQtbnxFea/9LAAAAAElFTkSuQmCC"}],"display":{"thirdperson_righthand":{"rotation":[75,45,0],"translation":[0,2.5,0],"scale":[0.375,0.375,0.375]},"thirdperson_lefthand":{"rotation":[75,45,0],"translation":[0,2.5,0],"scale":[0.375,0.375,0.375]},"firstperson_righthand":{"rotation":[0,45,0],"scale":[0.4,0.4,0.4]},"firstperson_lefthand":{"rotation":[0,225,0],"scale":[0.4,0.4,0.4]},"ground":{"translation":[0,3,0],"scale":[0.25,0.25,0.25]},"gui":{"rotation":[30,225,0],"scale":[0.625,0.625,0.625]},"fixed":{"scale":[0.5,0.5,0.5]}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/de/saschat/createcomputing/blocks/ComputerizedRedstoneLinkBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package de.saschat.createcomputing.blocks; | ||
|
||
import com.simibubi.create.foundation.block.ITE; | ||
import de.saschat.createcomputing.Registries; | ||
import de.saschat.createcomputing.tiles.ComputerizedRedstoneLinkTile; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.BlockGetter; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
import net.minecraft.world.level.block.state.BlockBehaviour; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.level.material.Material; | ||
import net.minecraft.world.phys.shapes.CollisionContext; | ||
import net.minecraft.world.phys.shapes.VoxelShape; | ||
|
||
public class ComputerizedRedstoneLinkBlock extends Block implements ITE<ComputerizedRedstoneLinkTile> { | ||
public ComputerizedRedstoneLinkBlock() { | ||
super(BlockBehaviour.Properties.of(Material.WOOD)); | ||
} | ||
|
||
@Override | ||
public Class<ComputerizedRedstoneLinkTile> getTileEntityClass() { | ||
return ComputerizedRedstoneLinkTile.class; | ||
} | ||
|
||
@Override | ||
public BlockEntityType<? extends ComputerizedRedstoneLinkTile> getTileEntityType() { | ||
return Registries.COMPUTERIZED_REDSTONE_LINK_TILE.get(); | ||
} | ||
|
||
|
||
@Override | ||
public VoxelShape getShape(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) { | ||
return box( | ||
1,0,1,15,2,15 | ||
); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/de/saschat/createcomputing/config/CreateComputingConfigServer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package de.saschat.createcomputing.config; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraftforge.common.ForgeConfigSpec; | ||
import net.minecraftforge.common.ForgeConfigSpec.*; | ||
import org.apache.commons.lang3.tuple.Pair; | ||
|
||
import java.util.List; | ||
|
||
public class CreateComputingConfigServer { | ||
public ConfigValue<List<String>> BANNED_LINK_ITEMS; | ||
public LongValue MAXIMUM_CONCURRENT_LINKS; | ||
|
||
public CreateComputingConfigServer(ForgeConfigSpec.Builder builder) { | ||
BANNED_LINK_ITEMS = builder.comment("These are the items the computerized redstone link cannot use.").define( | ||
"computerized_redstone_link.banned_link_items", | ||
List.of( | ||
new ResourceLocation("minecraft", "dragon_egg").toString(), | ||
new ResourceLocation("minecraft", "nether_star").toString() | ||
) | ||
); | ||
MAXIMUM_CONCURRENT_LINKS = builder.comment("This is the maximum amount of concurrent handles one computerized redstone link is allowed ot have.").defineInRange( | ||
"computerized_redstone_link.maximum_concurrent_links", | ||
8, | ||
1, | ||
Long.MAX_VALUE | ||
); | ||
|
||
} | ||
|
||
public static Pair<CreateComputingConfigServer, ForgeConfigSpec> pair = new ForgeConfigSpec.Builder() | ||
.configure(CreateComputingConfigServer::new); | ||
|
||
public static CreateComputingConfigServer get() { | ||
return pair.getLeft(); | ||
} | ||
} |
Oops, something went wrong.