1.15-pre1

This commit is contained in:
modmuss50 2019-11-21 21:51:30 +00:00
parent f9b9279500
commit c8ce611841
12 changed files with 25 additions and 18 deletions

View file

@ -73,12 +73,12 @@ license {
group = 'TechReborn'
dependencies {
minecraft "com.mojang:minecraft:19w46a"
mappings "net.fabricmc:yarn:19w46a+build.2:v2"
modCompile "net.fabricmc:fabric-loader:0.6.4+build.169"
minecraft "com.mojang:minecraft:1.15-pre1"
mappings "net.fabricmc:yarn:1.15-pre1+build.3:v2"
modCompile "net.fabricmc:fabric-loader:0.7.1+build.173"
//Fabric api
modCompile "net.fabricmc.fabric-api:fabric-api:0.4.12+build.261-1.15"
modCompile "net.fabricmc.fabric-api:fabric-api:0.4.13+build.263-1.15"
modCompileOnly "io.github.prospector:modmenu:1.7.9-unstable.19w34a+build.1"
modCompileOnly ("me.shedaniel:RoughlyEnoughItems:3.2.6+build.49") {

View file

@ -24,9 +24,11 @@
package techreborn;
import com.mojang.datafixers.util.Pair;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
import net.minecraft.class_4730;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderLayers;
import net.minecraft.client.render.model.BakedModel;
@ -83,13 +85,13 @@ public class TechRebornClient implements ClientModInitializer {
}
@Override
public Collection<Identifier> getTextureDependencies(Function<Identifier, UnbakedModel> function, Set<String> set) {
public Collection<class_4730> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter, Set<Pair<String, String>> unresolvedTextureReferences) {
return Collections.emptyList();
}
@Nullable
@Override
public BakedModel bake(ModelLoader loader, Function<Identifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier identifier) {
public BakedModel bake(ModelLoader loader, Function<class_4730, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
return new DynamicCellBakedModel();
}
@ -104,15 +106,16 @@ public class TechRebornClient implements ClientModInitializer {
}
@Override
public Collection<Identifier> getTextureDependencies(Function<Identifier, UnbakedModel> function, Set<String> set) {
public Collection<class_4730> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter, Set<Pair<String, String>> unresolvedTextureReferences) {
return Collections.emptyList();
}
@Nullable
@Override
public BakedModel bake(ModelLoader loader, Function<Identifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier identifier) {
public BakedModel bake(ModelLoader loader, Function<class_4730, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
return new DynamicBucketBakedModel();
}
};
}
}

View file

@ -62,7 +62,7 @@ public class BlockAlarm extends BaseBlockEntityProvider {
public BlockAlarm() {
super(Block.Settings.of(Material.STONE).strength(2f, 2f));
this.setDefaultState(this.stateFactory.getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
this.shape = GenCuboidShapes(3, 10);
BlockWrenchEventHandler.wrenableBlocks.add(this);
}

View file

@ -90,7 +90,7 @@ public class CableBlock extends BlockWithEntity {
public CableBlock(TRContent.Cables type) {
super(Block.Settings.of(Material.STONE).strength(1f, 8f));
this.type = type;
setDefaultState(this.stateFactory.getDefaultState().with(EAST, false).with(WEST, false).with(NORTH, false)
setDefaultState(this.getStateManager().getDefaultState().with(EAST, false).with(WEST, false).with(NORTH, false)
.with(SOUTH, false).with(UP, false).with(DOWN, false));
BlockWrenchEventHandler.wrenableBlocks.add(this);
}

View file

@ -64,7 +64,7 @@ public class BlockLamp extends BaseBlockEntityProvider {
super(FabricBlockSettings.of(Material.REDSTONE_LAMP).strength(2f, 2f).lightLevel(brightness).build());
this.shape = genCuboidShapes(depth, width);
this.cost = cost;
this.setDefaultState(this.stateFactory.getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
BlockWrenchEventHandler.wrenableBlocks.add(this);
}

View file

@ -51,7 +51,7 @@ public class BlockNuke extends BaseBlock {
public BlockNuke() {
super(Block.Settings.of(Material.TNT));
this.setDefaultState(this.stateFactory.getDefaultState().with(OVERLAY, false));
this.setDefaultState(this.getStateManager().getDefaultState().with(OVERLAY, false));
}
public void ignite(World worldIn, BlockPos pos, BlockState state, LivingEntity igniter) {

View file

@ -59,7 +59,7 @@ public abstract class BlockEnergyStorage extends BaseBlockEntityProvider {
public BlockEnergyStorage(String name, IMachineGuiHandler gui) {
super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f).build());
this.setDefaultState(this.stateFactory.getDefaultState().with(FACING, Direction.NORTH));
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH));
this.name = name;
this.gui = gui;
BlockWrenchEventHandler.wrenableBlocks.add(this);

View file

@ -59,7 +59,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
public BlockPlayerDetector() {
super(Block.Settings.of(Material.METAL).strength(2f, 2f), true);
this.setDefaultState(this.stateFactory.getDefaultState().with(TYPE, PlayerDetectorType.ALL));
this.setDefaultState(this.getStateManager().getDefaultState().with(TYPE, PlayerDetectorType.ALL));
}
// BlockMachineBase

View file

@ -56,7 +56,7 @@ public abstract class BlockTransformer extends BaseBlockEntityProvider {
public BlockTransformer(String name) {
super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f).build());
this.setDefaultState(this.stateFactory.getDefaultState().with(FACING, Direction.NORTH));
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH));
this.name = name;
BlockWrenchEventHandler.wrenableBlocks.add(this);
}

View file

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

View file

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

View file

@ -67,7 +67,7 @@ public class RenderNukePrimed extends EntityRenderer<EntityNukePrimed> {
matrixStack.scale(j, j, j);
}
matrixStack.multiply(Vector3f.POSITIVE_Y.getRotationQuaternion(-90.0F));
matrixStack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90.0F));
matrixStack.translate(-0.5D, -0.5D, 0.5D);
TntMinecartEntityRenderer.method_23190(TRContent.NUKE.getDefaultState(), matrixStack, vertexConsumerProvider, i, entity.getFuseTimer() / 5 % 2 == 0);
matrixStack.pop();