mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-19 19:49:41 +00:00
Update to 1.15.2 mappings (#131)
This commit is contained in:
1 parent
5a5d90fb13
commit
22e142f94e
16 files changed
+56
-30
No files matched your search
@@ -41,7 +41,7 @@ public abstract class InventoryBlock extends ContainerBlock {
|
||||
*/
|
||||
protected abstract boolean openGui(PlayerEntity player, World world, BlockPos pos);
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ActionResultType func_225533_a_(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult rayTraceResult) {
|
||||
if (player.func_226272_bl_()) {
|
||||
return ActionResultType.PASS;
|
||||
|
||||
@@ -60,8 +60,8 @@ public class ExtraHeartRenderHandler {
|
||||
|
||||
// extra setup stuff from us
|
||||
left_height = ForgeIngameGui.left_height;
|
||||
this.width = this.mc.func_228018_at_().getScaledWidth();
|
||||
this.height = this.mc.func_228018_at_().getScaledHeight();
|
||||
this.width = this.mc.getMainWindow().getScaledWidth();
|
||||
this.height = this.mc.getMainWindow().getScaledHeight();
|
||||
event.setCanceled(true);
|
||||
int updateCounter = this.mc.ingameGUI.getTicks();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ModelHelper {
|
||||
private final float r, g, b, a;
|
||||
|
||||
public ColorTransformer(int color, BakedQuad quad) {
|
||||
super(new BakedQuadBuilder(quad.getSprite()));
|
||||
super(new BakedQuadBuilder(quad.func_187508_a()));
|
||||
|
||||
int a = (color >> 24);
|
||||
if (a == 0) {
|
||||
|
||||
@@ -39,12 +39,12 @@ public class StructureBlockAccess implements IWorldReader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorldLightManager func_225524_e_() {
|
||||
public WorldLightManager getLightManager() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_226658_a_(LightType type, BlockPos pos) {
|
||||
public int getLightFor(LightType type, BlockPos pos) {
|
||||
return 15 << 20 | 15 << 4;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class StructureBlockAccess implements IWorldReader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Biome func_226691_t_(BlockPos pos) {
|
||||
public Biome getBiome(BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ public class ItemStackData implements IDataElement {
|
||||
CompoundNBT display = itemStack.getOrCreateChildTag("display");
|
||||
display.putString("Name", "\u00A7rUnknown Item");
|
||||
ListNBT lore = new ListNBT();
|
||||
lore.add(StringNBT.func_229705_a_("\u00A7r\u00A7eItem Name:"));
|
||||
lore.add(StringNBT.func_229705_a_("\u00A7r\u00A7e" + this.id));
|
||||
lore.add(StringNBT.valueOf("\u00A7r\u00A7eItem Name:"));
|
||||
lore.add(StringNBT.valueOf("\u00A7r\u00A7e" + this.id));
|
||||
display.put("Lore", lore);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,11 @@ public class BakedSimple implements IBakedModel {
|
||||
return this.isGui3d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_230044_c_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return false;
|
||||
|
||||
@@ -27,6 +27,7 @@ public class BakedWrapper implements IBakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand) {
|
||||
return this.parent.getQuads(state, side, rand);
|
||||
}
|
||||
@@ -41,6 +42,11 @@ public class BakedWrapper implements IBakedModel {
|
||||
return this.parent.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_230044_c_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return this.parent.isBuiltInRenderer();
|
||||
@@ -54,6 +60,7 @@ public class BakedWrapper implements IBakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public ItemCameraTransforms getItemCameraTransforms() {
|
||||
return this.parent.getItemCameraTransforms();
|
||||
}
|
||||
@@ -77,5 +84,10 @@ public class BakedWrapper implements IBakedModel {
|
||||
public IBakedModel handlePerspective(ItemCameraTransforms.TransformType cameraTransformType, MatrixStack mat) {
|
||||
return PerspectiveMapWrapper.handlePerspective(this, this.transforms, cameraTransformType, mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_230044_c_() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class BlockItemModelWrapper implements IBakedModel {
|
||||
}
|
||||
|
||||
if (transform != null) {
|
||||
mat.func_227866_c_().func_227870_a_().func_226595_a_(transform.func_227988_c_());
|
||||
mat.getLast().getPositionMatrix().multiply(transform.func_227988_c_());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -60,6 +60,11 @@ public class BlockItemModelWrapper implements IBakedModel {
|
||||
return this.parent.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_230044_c_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return this.parent.isBuiltInRenderer();
|
||||
@@ -73,6 +78,7 @@ public class BlockItemModelWrapper implements IBakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public ItemCameraTransforms getItemCameraTransforms() {
|
||||
return this.parent.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class TRSRBakedModel implements IBakedModel {
|
||||
side = Direction.byHorizontalIndex((side.getHorizontalIndex() + this.faceOffset) % 4);
|
||||
}
|
||||
for (BakedQuad quad : this.original.getQuads(state, side, rand)) {
|
||||
Transformer transformer = new Transformer(this.transformation, quad.getSprite());
|
||||
Transformer transformer = new Transformer(this.transformation, quad.func_187508_a());
|
||||
quad.pipe(transformer);
|
||||
builder.add(transformer.build());
|
||||
}
|
||||
@@ -103,6 +103,11 @@ public class TRSRBakedModel implements IBakedModel {
|
||||
return this.original.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_230044_c_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return this.original.isBuiltInRenderer();
|
||||
|
||||
@@ -532,11 +532,11 @@ public class BookScreen extends Screen {
|
||||
}
|
||||
|
||||
protected int getMouseX(boolean rightSide) {
|
||||
return (int) ((Minecraft.getInstance().mouseHelper.getMouseX() * this.width / this.minecraft.func_228018_at_().getFramebufferWidth() - this.leftOffset(rightSide)) / PAGE_SCALE);
|
||||
return (int) ((Minecraft.getInstance().mouseHelper.getMouseX() * this.width / this.minecraft.getMainWindow().getFramebufferWidth() - this.leftOffset(rightSide)) / PAGE_SCALE);
|
||||
}
|
||||
|
||||
protected int getMouseY() {
|
||||
return (int) ((Minecraft.getInstance().mouseHelper.getMouseY() * this.height / this.minecraft.func_228018_at_().getFramebufferHeight() - 1 - this.topOffset()) / PAGE_SCALE);
|
||||
return (int) ((Minecraft.getInstance().mouseHelper.getMouseY() * this.height / this.minecraft.getMainWindow().getFramebufferHeight() - 1 - this.topOffset()) / PAGE_SCALE);
|
||||
}
|
||||
|
||||
public int openPage(int page) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import slimeknights.mantle.Mantle;
|
||||
import slimeknights.mantle.client.book.data.element.TextData;
|
||||
@@ -255,10 +255,10 @@ public class TextDataRenderer {
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder vertexBuffer = tessellator.getBuffer();
|
||||
vertexBuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
vertexBuffer.func_225582_a_((double) right, (double) top, 0D).func_227885_a_(f1, f2, f3, f).endVertex();
|
||||
vertexBuffer.func_225582_a_((double) left, (double) top, 0D).func_227885_a_(f1, f2, f3, f).endVertex();
|
||||
vertexBuffer.func_225582_a_((double) left, (double) bottom, 0D).func_227885_a_(f5, f6, f7, f4).endVertex();
|
||||
vertexBuffer.func_225582_a_((double) right, (double) bottom, 0D).func_227885_a_(f5, f6, f7, f4).endVertex();
|
||||
vertexBuffer.pos((double) right, (double) top, 0D).color(f1, f2, f3, f).endVertex();
|
||||
vertexBuffer.pos((double) left, (double) top, 0D).color(f1, f2, f3, f).endVertex();
|
||||
vertexBuffer.pos((double) left, (double) bottom, 0D).color(f5, f6, f7, f4).endVertex();
|
||||
vertexBuffer.pos((double) right, (double) bottom, 0D).color(f5, f6, f7, f4).endVertex();
|
||||
tessellator.draw();
|
||||
RenderSystem.shadeModel(7424);
|
||||
RenderSystem.enableAlphaTest();
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
import slimeknights.mantle.client.screen.book.BookScreen;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -230,8 +230,8 @@ public class ElementStructure extends SizedBookElement {
|
||||
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
Random random = new Random();
|
||||
|
||||
matrixstack.func_227860_a_();
|
||||
matrixstack.func_227861_a_((double) (pos.getX() & 15), (double) (pos.getY() & 15), (double) (pos.getZ() & 15));
|
||||
matrixstack.push();
|
||||
matrixstack.translate((double) (pos.getX() & 15), (double) (pos.getY() & 15), (double) (pos.getZ() & 15));
|
||||
|
||||
blockRender.renderModel(state, pos, this.blockAccess, matrixstack, buffer, false, random, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
|
||||
tessellator.draw();
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package slimeknights.mantle.client.screen.book.element;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import slimeknights.mantle.client.screen.book.BookScreen;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.nbt.StringNBT;
|
||||
|
||||
public class TagHelper {
|
||||
|
||||
public static int TAG_TYPE_STRING = (StringNBT.func_229705_a_("")).getId();
|
||||
public static int TAG_TYPE_STRING = (StringNBT.valueOf("")).getId();
|
||||
public static int TAG_TYPE_COMPOUND = (new CompoundNBT()).getId();
|
||||
|
||||
private TagHelper() {
|
||||
|
||||
Reference in new issue
Block a user