1.15-pre2 loads of new mappings

This commit is contained in:
modmuss50 2019-11-26 19:03:36 +00:00
parent 937b184ace
commit bfdde04892
21 changed files with 45 additions and 42 deletions

View file

@ -73,12 +73,12 @@ license {
group = 'TechReborn' group = 'TechReborn'
dependencies { dependencies {
minecraft "com.mojang:minecraft:1.15-pre1" minecraft "com.mojang:minecraft:1.15-pre2"
mappings "net.fabricmc:yarn:1.15-pre1+build.3:v2" mappings "net.fabricmc:yarn:1.15-pre2+build.3:v2"
modCompile "net.fabricmc:fabric-loader:0.7.1+build.173" modCompile "net.fabricmc:fabric-loader:0.7.1+build.173"
//Fabric api //Fabric api
modCompile "net.fabricmc.fabric-api:fabric-api:0.4.13+build.264-1.15" modCompile "net.fabricmc.fabric-api:fabric-api:0.4.16+build.268-1.15"
modCompileOnly "io.github.prospector:modmenu:1.7.9-unstable.19w34a+build.1" modCompileOnly "io.github.prospector:modmenu:1.7.9-unstable.19w34a+build.1"
modCompileOnly ("me.shedaniel:RoughlyEnoughItems:3.2.7-unstable.201911150440") modCompileOnly ("me.shedaniel:RoughlyEnoughItems:3.2.7-unstable.201911150440")

View file

@ -28,7 +28,6 @@ import com.mojang.datafixers.util.Pair;
import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry; import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
import net.minecraft.class_4730;
import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderLayers; import net.minecraft.client.render.RenderLayers;
import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.BakedModel;
@ -37,6 +36,7 @@ import net.minecraft.client.render.model.ModelLoader;
import net.minecraft.client.render.model.UnbakedModel; import net.minecraft.client.render.model.UnbakedModel;
import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.Sprite;
import net.minecraft.client.util.ModelIdentifier; import net.minecraft.client.util.ModelIdentifier;
import net.minecraft.client.util.SpriteIdentifier;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids; import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -86,13 +86,13 @@ public class TechRebornClient implements ClientModInitializer {
} }
@Override @Override
public Collection<class_4730> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter, Set<Pair<String, String>> unresolvedTextureReferences) { public Collection<SpriteIdentifier> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter, Set<Pair<String, String>> unresolvedTextureReferences) {
return Collections.emptyList(); return Collections.emptyList();
} }
@Nullable @Nullable
@Override @Override
public BakedModel bake(ModelLoader loader, Function<class_4730, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) { public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
return new DynamicCellBakedModel(); return new DynamicCellBakedModel();
} }
@ -107,13 +107,13 @@ public class TechRebornClient implements ClientModInitializer {
} }
@Override @Override
public Collection<class_4730> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter, Set<Pair<String, String>> unresolvedTextureReferences) { public Collection<SpriteIdentifier> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter, Set<Pair<String, String>> unresolvedTextureReferences) {
return Collections.emptyList(); return Collections.emptyList();
} }
@Nullable @Nullable
@Override @Override
public BakedModel bake(ModelLoader loader, Function<class_4730, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) { public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
return new DynamicBucketBakedModel(); return new DynamicBucketBakedModel();
} }

View file

@ -65,7 +65,7 @@ public class FluidReplicatorRecipe extends RebornFluidRecipe {
if (!blockEntity.getMultiBlock()) { if (!blockEntity.getMultiBlock()) {
return false; return false;
} }
final BlockPos hole = blockEntity.getPos().method_10079(blockEntity.getFacing().getOpposite(), 2); final BlockPos hole = blockEntity.getPos().offset(blockEntity.getFacing().getOpposite(), 2);
final Fluid fluid = techreborn.utils.FluidUtils.fluidFromBlock(blockEntity.getWorld().getBlockState(hole).getBlock()); final Fluid fluid = techreborn.utils.FluidUtils.fluidFromBlock(blockEntity.getWorld().getBlockState(hole).getBlock());
if (fluid == Fluids.EMPTY) { if (fluid == Fluids.EMPTY) {
return true; return true;

View file

@ -61,7 +61,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
} }
public boolean isSunOut() { public boolean isSunOut() {
return canSeeSky && !world.isRaining() && !world.isThundering() && world.isDaylight(); return canSeeSky && !world.isRaining() && !world.isThundering() && world.isDay();
} }
private void updatePanel() { private void updatePanel() {

View file

@ -70,7 +70,7 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
@Override @Override
public void tick() { public void tick() {
if (multiblockChecker == null) { if (multiblockChecker == null) {
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2); final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
multiblockChecker = new MultiblockChecker(world, downCenter); multiblockChecker = new MultiblockChecker(world, downCenter);
} }

View file

@ -74,7 +74,7 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem
@Override @Override
public void tick() { public void tick() {
if (multiblockChecker == null) { if (multiblockChecker == null) {
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2); final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
multiblockChecker = new MultiblockChecker(world, downCenter); multiblockChecker = new MultiblockChecker(world, downCenter);
} }

View file

@ -63,7 +63,7 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
} }
// Bottom center of multiblock // Bottom center of multiblock
final BlockPos location = pos.method_10079(getFacing().getOpposite(), 2); final BlockPos location = pos.offset(getFacing().getOpposite(), 2);
final BlockEntity blockEntity = world.getBlockEntity(location); final BlockEntity blockEntity = world.getBlockEntity(location);
if (blockEntity instanceof MachineCasingBlockEntity) { if (blockEntity instanceof MachineCasingBlockEntity) {
@ -83,8 +83,8 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
heat += BlockMachineCasing.getHeatFromState(part.getCachedState()); heat += BlockMachineCasing.getHeatFromState(part.getCachedState());
} }
if (world.getBlockState(location.method_10079(Direction.UP, 1)).getMaterial().equals(Material.LAVA) if (world.getBlockState(location.offset(Direction.UP, 1)).getMaterial().equals(Material.LAVA)
&& world.getBlockState(location.method_10079(Direction.UP, 2)).getMaterial().equals(Material.LAVA)) { && world.getBlockState(location.offset(Direction.UP, 2)).getMaterial().equals(Material.LAVA)) {
heat += 500; heat += 500;
} }
return heat; return heat;
@ -121,7 +121,7 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
@Override @Override
public void tick() { public void tick() {
if (multiblockChecker == null) { if (multiblockChecker == null) {
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2); final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
multiblockChecker = new MultiblockChecker(world, downCenter); multiblockChecker = new MultiblockChecker(world, downCenter);
} }
super.tick(); super.tick();

View file

@ -81,7 +81,7 @@ public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity impl
@Override @Override
public void tick() { public void tick() {
if (multiblockChecker == null) { if (multiblockChecker == null) {
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2).method_10079(Direction.DOWN, 1); final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2).offset(Direction.DOWN, 1);
multiblockChecker = new MultiblockChecker(world, downCenter); multiblockChecker = new MultiblockChecker(world, downCenter);
} }

View file

@ -81,7 +81,7 @@ public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity impl
@Override @Override
public void tick() { public void tick() {
if (multiblockChecker == null) { if (multiblockChecker == null) {
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2).method_10079(Direction.DOWN, 1); final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2).offset(Direction.DOWN, 1);
multiblockChecker = new MultiblockChecker(world, downCenter); multiblockChecker = new MultiblockChecker(world, downCenter);
} }

View file

@ -72,7 +72,7 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
@Override @Override
public void cancelRemoval() { public void cancelRemoval() {
super.cancelRemoval(); super.cancelRemoval();
multiblockChecker = new MultiblockChecker(world, pos.method_10079(Direction.DOWN, 1)); multiblockChecker = new MultiblockChecker(world, pos.offset(Direction.DOWN, 1));
} }
// IContainerProvider // IContainerProvider

View file

@ -129,7 +129,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
requiredSize = 0; requiredSize = 0;
} }
if (stacksInSlots[i] > requiredSize) { if (stacksInSlots[i] > requiredSize) {
if (ingredient.method_8093(stack)) { if (ingredient.test(stack)) {
if (stack.getItem().getRecipeRemainder() != null) { if (stack.getItem().getRecipeRemainder() != null) {
if (!hasRoomForExtraItem(new ItemStack(stack.getItem().getRecipeRemainder()))) { if (!hasRoomForExtraItem(new ItemStack(stack.getItem().getRecipeRemainder()))) {
continue; continue;
@ -186,13 +186,13 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
Ingredient ingredient = ingredients.get(i); Ingredient ingredient = ingredients.get(i);
// Looks for the best slot to take it from // Looks for the best slot to take it from
ItemStack bestSlot = inventory.getInvStack(i); ItemStack bestSlot = inventory.getInvStack(i);
if (ingredient.method_8093(bestSlot)) { if (ingredient.test(bestSlot)) {
handleContainerItem(bestSlot); handleContainerItem(bestSlot);
bestSlot.decrement(1); bestSlot.decrement(1);
} else { } else {
for (int j = 0; j < 9; j++) { for (int j = 0; j < 9; j++) {
ItemStack stack = inventory.getInvStack(j); ItemStack stack = inventory.getInvStack(j);
if (ingredient.method_8093(stack)) { if (ingredient.test(stack)) {
handleContainerItem(stack); handleContainerItem(stack);
stack.decrement(1); stack.decrement(1);
break; break;
@ -228,7 +228,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
public boolean hasIngredient(Ingredient ingredient) { public boolean hasIngredient(Ingredient ingredient) {
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
ItemStack stack = inventory.getInvStack(i); ItemStack stack = inventory.getInvStack(i);
if (ingredient.method_8093(stack)) { if (ingredient.test(stack)) {
return true; return true;
} }
} }
@ -255,7 +255,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
for (int i = 0; i < recipe.getPreviewInputs().size(); i++) { for (int i = 0; i < recipe.getPreviewInputs().size(); i++) {
ItemStack stackInSlot = inventory.getInvStack(i); ItemStack stackInSlot = inventory.getInvStack(i);
Ingredient ingredient = ingredients.get(i); Ingredient ingredient = ingredients.get(i);
if (ingredient != Ingredient.EMPTY && ingredient.method_8093(stack)) { if (ingredient != Ingredient.EMPTY && ingredient.test(stack)) {
if (stackInSlot.isEmpty()) { if (stackInSlot.isEmpty()) {
possibleSlots.add(i); possibleSlots.add(i);
} else if (stackInSlot.getItem() == stack.getItem()) { } else if (stackInSlot.getItem() == stack.getItem()) {

View file

@ -214,7 +214,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
for (int s = 0; s < currentRecipe.getPreviewInputs().size(); s++) { for (int s = 0; s < currentRecipe.getPreviewInputs().size(); s++) {
ItemStack stackInSlot = inventory.getInvStack(s); ItemStack stackInSlot = inventory.getInvStack(s);
Ingredient ingredient = (Ingredient) currentRecipe.getPreviewInputs().get(s); Ingredient ingredient = (Ingredient) currentRecipe.getPreviewInputs().get(s);
if (ingredient != Ingredient.EMPTY && ingredient.method_8093(sourceStack)) { if (ingredient != Ingredient.EMPTY && ingredient.test(sourceStack)) {
if (stackInSlot.isEmpty()) { if (stackInSlot.isEmpty()) {
possibleSlots.add(s); possibleSlots.add(s);
} else if (stackInSlot.getItem() == sourceStack.getItem()) { } else if (stackInSlot.getItem() == sourceStack.getItem()) {

View file

@ -115,7 +115,7 @@ public class CableBlock extends BlockWithEntity {
} }
private BlockState makeConnections(World world, BlockPos pos) { private BlockState makeConnections(World world, BlockPos pos) {
Boolean down = canConnectTo(world, pos.method_10079(Direction.DOWN, 1), Direction.UP); Boolean down = canConnectTo(world, pos.offset(Direction.DOWN, 1), Direction.UP);
Boolean up = canConnectTo(world, pos.up(), Direction.DOWN); Boolean up = canConnectTo(world, pos.up(), Direction.DOWN);
Boolean north = canConnectTo(world, pos.north(), Direction.SOUTH); Boolean north = canConnectTo(world, pos.north(), Direction.SOUTH);
Boolean east = canConnectTo(world, pos.east(), Direction.WEST); Boolean east = canConnectTo(world, pos.east(), Direction.WEST);

View file

@ -107,7 +107,7 @@ public class BlockRubberLog extends LogBlock {
} }
if (random.nextInt(50) == 0) { if (random.nextInt(50) == 0) {
Direction facing = Direction.fromHorizontal(random.nextInt(4)); Direction facing = Direction.fromHorizontal(random.nextInt(4));
if (worldIn.getBlockState(pos.method_10079(Direction.DOWN, 1)).getBlock() == this if (worldIn.getBlockState(pos.offset(Direction.DOWN, 1)).getBlock() == this
&& worldIn.getBlockState(pos.up()).getBlock() == this) { && worldIn.getBlockState(pos.up()).getBlock() == this) {
worldIn.setBlockState(pos, state.with(HAS_SAP, true).with(SAP_SIDE, facing)); worldIn.setBlockState(pos, state.with(HAS_SAP, true).with(SAP_SIDE, facing));
} }

View file

@ -143,7 +143,7 @@ public class GuiIndustrialSawmill extends GuiBase<BuiltContainer> {
this.blockEntity.getPos().getX() this.blockEntity.getPos().getX()
- Direction.byId(this.blockEntity.getFacingInt()).getOffsetY() * 2, - Direction.byId(this.blockEntity.getFacingInt()).getOffsetY() * 2,
this.blockEntity.getPos().getY() - 1, this.blockEntity.getPos().getZ() this.blockEntity.getPos().getY() - 1, this.blockEntity.getPos().getZ()
- Direction.byId(this.blockEntity.getFacingInt()).getOffsetY() * 2).method_10079(blockEntity.getFacing().getOpposite(), 2); - Direction.byId(this.blockEntity.getFacingInt()).getOffsetY() * 2).offset(blockEntity.getFacing().getOpposite(), 2);
} }
} else { } else {
RebornCoreClient.multiblockRenderEvent.setMultiblock(null); RebornCoreClient.multiblockRenderEvent.setMultiblock(null);

View file

@ -130,7 +130,7 @@ public class GuiVacuumFreezer extends GuiBase<BuiltContainer> {
final MultiblockSet set = new MultiblockSet(multiblock); final MultiblockSet set = new MultiblockSet(multiblock);
RebornCoreClient.multiblockRenderEvent.setMultiblock(set); RebornCoreClient.multiblockRenderEvent.setMultiblock(set);
RebornCoreClient.multiblockRenderEvent.parent = blockEntity.getPos(); RebornCoreClient.multiblockRenderEvent.parent = blockEntity.getPos();
MultiblockRenderEvent.anchor = blockEntity.getPos().method_10079(Direction.DOWN, 1); MultiblockRenderEvent.anchor = blockEntity.getPos().offset(Direction.DOWN, 1);
} }
} else { } else {
RebornCoreClient.multiblockRenderEvent.setMultiblock(null); RebornCoreClient.multiblockRenderEvent.setMultiblock(null);

View file

@ -24,7 +24,6 @@
package techreborn.client.render; package techreborn.client.render;
import net.minecraft.class_4730;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.Sprite;
import net.minecraft.client.texture.SpriteAtlasTexture; import net.minecraft.client.texture.SpriteAtlasTexture;
@ -40,7 +39,9 @@ public class DynamicBucketBakedModel extends BaseDynamicFluidBakedModel {
@Override @Override
public Sprite getSprite() { public Sprite getSprite() {
return new class_4730(SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier("minecraft:item/bucket")).method_24148(); return MinecraftClient.getInstance()
.getSpriteAtlas(SpriteAtlasTexture.BLOCK_ATLAS_TEX)
.apply(new Identifier("minecraft:item/bucket"));
} }
@Override @Override

View file

@ -25,12 +25,12 @@
package techreborn.client.render; package techreborn.client.render;
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
import net.minecraft.class_4730;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.model.BakedModelManager; import net.minecraft.client.render.model.BakedModelManager;
import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.Sprite;
import net.minecraft.client.texture.SpriteAtlasTexture; import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.client.util.ModelIdentifier; import net.minecraft.client.util.ModelIdentifier;
import net.minecraft.client.util.SpriteIdentifier;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import techreborn.TechReborn; import techreborn.TechReborn;
@ -55,7 +55,9 @@ public class DynamicCellBakedModel extends BaseDynamicFluidBakedModel {
@Override @Override
public Sprite getSprite() { public Sprite getSprite() {
return new class_4730(SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier("techreborn:item/cell_base")).method_24148(); return MinecraftClient.getInstance()
.getSpriteAtlas(SpriteAtlasTexture.BLOCK_ATLAS_TEX)
.apply(new Identifier("techreborn:item/cell_base"));
} }
@Override @Override

View file

@ -56,7 +56,7 @@ public class TRRecipeHandler {
if (!recipe.getId().getNamespace().equals(TechReborn.MOD_ID)) { if (!recipe.getId().getNamespace().equals(TechReborn.MOD_ID)) {
return false; return false;
} }
return !recipe.getPreviewInputs().stream().anyMatch((Predicate<Ingredient>) ingredient -> ingredient.method_8093(TRContent.Parts.UU_MATTER.getStack())); return !recipe.getPreviewInputs().stream().anyMatch((Predicate<Ingredient>) ingredient -> ingredient.test(TRContent.Parts.UU_MATTER.getStack()));
} }
} }

View file

@ -50,8 +50,8 @@ public class RubberTreeFeature extends OakTreeFeature {
} }
@Override @Override
public boolean method_23402(ModifiableTestableWorld world, Random random, BlockPos blockPos, Set<BlockPos> set, Set<BlockPos> set2, BlockBox blockBox, BranchedTreeFeatureConfig branchedTreeFeatureConfig) { public boolean generate(ModifiableTestableWorld world, Random random, BlockPos blockPos, Set<BlockPos> set, Set<BlockPos> set2, BlockBox blockBox, BranchedTreeFeatureConfig branchedTreeFeatureConfig) {
if(super.method_23402(world, random, blockPos, set, set2, blockBox, branchedTreeFeatureConfig)) { if(super.generate(world, random, blockPos, set, set2, blockBox, branchedTreeFeatureConfig)) {
spawnSpike(world, blockPos); spawnSpike(world, blockPos);
return true; return true;
} }

View file

@ -75,7 +75,7 @@ public class WorldGenerator {
} }
private static void setupTrees() { private static void setupTrees() {
RUBBER_TREE = Registry.register(Registry.FEATURE, new Identifier("techreborn:rubber_tree"), new RubberTreeFeature(BranchedTreeFeatureConfig::method_23426)); RUBBER_TREE = Registry.register(Registry.FEATURE, new Identifier("techreborn:rubber_tree"), new RubberTreeFeature(BranchedTreeFeatureConfig::deserialize2));
WeightedStateProvider logProvider = new WeightedStateProvider(); WeightedStateProvider logProvider = new WeightedStateProvider();
logProvider.addState(TRContent.RUBBER_LOG.getDefaultState(), 10); logProvider.addState(TRContent.RUBBER_LOG.getDefaultState(), 10);
@ -92,11 +92,11 @@ public class WorldGenerator {
logProvider, logProvider,
new SimpleStateProvider(TRContent.RUBBER_LEAVES.getDefaultState()), new SimpleStateProvider(TRContent.RUBBER_LEAVES.getDefaultState()),
new BlobFoliagePlacer(2, 0)) new BlobFoliagePlacer(2, 0))
.method_23428(6) //Base height .baseHeight(6)
.method_23430(2) .heightRandA(2)
.method_23437(3) .foliageHeight(3)
.method_23427() .noVines()
.method_23431(); .build();
} }