mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 22:44:07 +01:00
Fix dyed handle compilation error
- Revert DYED_VALVE_HANDLES to using an array instead of a Vector
This commit is contained in:
parent
20cd8da377
commit
d31fe013ce
@ -9,8 +9,6 @@ import static com.simibubi.create.foundation.data.CreateRegistrate.connectedText
|
||||
import static com.simibubi.create.foundation.data.ModelGen.customItemModel;
|
||||
import static com.simibubi.create.foundation.data.ModelGen.oxidizedItemModel;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import com.simibubi.create.AllTags.AllBlockTags;
|
||||
import com.simibubi.create.AllTags.AllItemTags;
|
||||
import com.simibubi.create.content.AllSections;
|
||||
@ -627,13 +625,12 @@ public class AllBlocks {
|
||||
.transform(BuilderTransformers.valveHandle(null))
|
||||
.register();
|
||||
|
||||
public static final Vector<BlockEntry<ValveHandleBlock>> DYED_VALVE_HANDLES =
|
||||
new Vector<>(DyeColor.values().length);
|
||||
public static final BlockEntry<?>[] DYED_VALVE_HANDLES = new BlockEntry<?>[DyeColor.values().length];
|
||||
|
||||
static {
|
||||
for (DyeColor colour : DyeColor.values()) {
|
||||
String colourName = colour.getString();
|
||||
DYED_VALVE_HANDLES.add(REGISTRATE.block(colourName + "_valve_handle", ValveHandleBlock::dyed)
|
||||
DYED_VALVE_HANDLES[colour.ordinal()] = REGISTRATE.block(colourName + "_valve_handle", ValveHandleBlock::dyed)
|
||||
.transform(BuilderTransformers.valveHandle(colour))
|
||||
.recipe((c, p) -> ShapedRecipeBuilder.shapedRecipe(c.get())
|
||||
.patternLine("#")
|
||||
@ -642,7 +639,7 @@ public class AllBlocks {
|
||||
.key('-', AllItemTags.VALVE_HANDLES.tag)
|
||||
.addCriterion("has_valve", RegistrateRecipeProvider.hasItem(AllItemTags.VALVE_HANDLES.tag))
|
||||
.build(p, Create.asResource("crafting/kinetics/" + c.getName() + "_from_other_valve_handle")))
|
||||
.register());
|
||||
.register();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,6 @@ import com.simibubi.create.content.schematics.block.SchematicannonInstance;
|
||||
import com.simibubi.create.content.schematics.block.SchematicannonRenderer;
|
||||
import com.simibubi.create.content.schematics.block.SchematicannonTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
||||
import com.tterrag.registrate.util.entry.BlockEntry;
|
||||
import com.tterrag.registrate.util.entry.TileEntityEntry;
|
||||
|
||||
public class AllTileEntities {
|
||||
@ -249,7 +248,7 @@ public class AllTileEntities {
|
||||
.tileEntity("hand_crank", HandCrankTileEntity::new)
|
||||
.instance(() -> HandCrankInstance::new)
|
||||
.validBlocks(AllBlocks.HAND_CRANK, AllBlocks.COPPER_VALVE_HANDLE)
|
||||
.validBlocks(AllBlocks.DYED_VALVE_HANDLES.toArray(new BlockEntry<?>[AllBlocks.DYED_VALVE_HANDLES.size()]))
|
||||
.validBlocks(AllBlocks.DYED_VALVE_HANDLES)
|
||||
.renderer(() -> HandCrankRenderer::new)
|
||||
.register();
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ValveHandleBlock extends HandCrankBlock {
|
||||
if (worldIn.isRemote)
|
||||
return ActionResultType.SUCCESS;
|
||||
|
||||
BlockState newState = AllBlocks.DYED_VALVE_HANDLES.get(color.ordinal())
|
||||
BlockState newState = AllBlocks.DYED_VALVE_HANDLES[color.ordinal()]
|
||||
.getDefaultState()
|
||||
.with(FACING, state.get(FACING));
|
||||
if (newState != state)
|
||||
|
@ -631,7 +631,7 @@ public class KineticsScenes {
|
||||
scene.overlay.showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick()
|
||||
.withItem(new ItemStack(Items.BLUE_DYE)), 40);
|
||||
scene.idle(7);
|
||||
scene.world.modifyBlock(util.grid.at(2, 2, 2), s -> AllBlocks.DYED_VALVE_HANDLES.get(11).getDefaultState()
|
||||
scene.world.modifyBlock(util.grid.at(2, 2, 2), s -> AllBlocks.DYED_VALVE_HANDLES[11].getDefaultState()
|
||||
.with(ValveHandleBlock.FACING, Direction.UP), true);
|
||||
scene.idle(10);
|
||||
scene.overlay.showText(70)
|
||||
|
Loading…
Reference in New Issue
Block a user