Everything posted by 61352151511
-
[1.7.10] onLivingUpdate Entity
Why IExtendedEntityProperties? If it's a small amount of NBT you can do something like NBTTagCompound persistentData = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); persistentData.setString("last_location", loc.toString()); player.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, persistentData); That's something I got from my code after reading iChun's Hats mod code, Unless I missed a huge part of it, that seems to work.
-
[SOLVED] How do you deobfuscate Minecraft 1.8?
Um, there is no forge 1.8.3, there is forge 1.8 but that's it. You do it the same way you would have in 1.7.10, download forge source (or userdev, I don't remember because I just copy and paste every time I start a new project) and run "gradlew setupDecompWorkspace eclipse" (or idea if that's your IDE) and you'll get the source code along with the forge source code.
-
[1.7.10] Implementing a toggle-button in a GuiContainer
I would just suggest updating the value client sided when the button is clicked, and then send the packet to the server so the server can store it. There's really no reason to send the packet back.
-
TileEntityCustomFurnace player.getDistanceSq((double): player cannot be resolved
I'll show you this mistake, but please do what they say and learn java. @Override public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D; } Your variable is p_70300_1_ you are trying to refer to "player" which doesn't exist. You either want to change player to p_70300_1_ or p_70300_1_ to player.
-
Environment Installation Problems
Perhaps this will help.
-
Environment Installation Problems
If you ran "gradle setupDecompWorkspace eclipse" You have it, it isn't under your source because you don't need the minecraft source in your source, it's under referenced libraries
-
[SOLVED][1.8]Issue with crops textures
Try removing the "," at the end of "age=4": { "model": "obockmod:orge_crops_4" }, I believe that will cause a malformed json since it is the last in the list.
-
Block Doesn't Show - Beginner
That would be 1.8, So be sure you set up your workspace right and you are following a 1.8 tutorial. Eclipse should be showing you an error at this part because IDs were removed in 1.7 super(i, materialIn); Also you are missing the @Mod annotation on the main mod class file Example: @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION) public class RandomUtilities {
-
Block Doesn't Show - Beginner
public static Block JackBlock = new JackBlock(500, Material.rock).setUnlocalizedName("JackBlock"); From this I can tell you're on 1.6.4, Please do NOT start modding for 1.6.4, update to 1.7.10 or more preferably 1.8. There's tutorials for both versions, if you can't get it to work after updating, post again and we'll try to help, most people here do not support 1.6.4.
-
Help with compiling mod
Mac people just complain about it being hard to update, I know for a fact it is possible to for mac users to use java 7, possibly even java 8 because my friend was having issues the other day trying to play my modpack and it turned out he was on java 6 (Using a mac) He ended up getting an updated version of java (After a few struggles) Not sure which launcher he's using (old/new) but I'm pretty sure it does work. As well as only 4% of minecraft players use macs according to dinnerbone via a reply on that tweet
-
Help with compiling mod
I think since the majority is now on 1.8 it's fine for people to mod with it, if people complain about stuff not working they can spend 2 minutes updating their java.
-
[1.6.4] Making a custom Furnace with 4 input slots
Quick example code public ItemStack[] in; public ItemStack out; public MultiSmelt(ItemStack[] in, ItemStack out) { this.in = in; this.out = out; } Now you have recipes, the ItemStack's can store the stack size. Simple make an array list with multiple of these recipes, then whenever the furnace updates check through the recipes, check to see if there is a recipe with the items in the furnace and if the items in the furnace have a stack size more than or equal to the stack in the "in" list. If so, smelt it to the "out" item.
-
[1.8] Custom model block rendering in inventory?
IMO My naming conventions are fine. I don't get what you mean by "nothing was linking to each other" I didn't push my build.gradle so the mappings used were wrong, but on my end all the names are correct. You commented out important stuff like the PacketHandler, Config, etc. So I didn't want to copy it exactly, I copied what I thought was relevant, yet it still does not work. Changed getRenderType to 2 Set the unlocalized name and copied the "BlockRU" class (Although I really don't think having block. instead of tile. would make a difference) Got rid of unlocalized name stuff in ItemBlock Switched from IProxy to CommonProxy and set up the methods seperately (bindTileEntitySpecialRenderers, registerRenderInformation, registerItemRenderers) All this is called in the init portion of the mod. The things you pushed other than that were irrelevant to the rendering in the inventory, so unless for some reason my workspace is broken in some way, I don't understand why it doesn't work. Edit: I forgot to refresh the resources folder >_> I should not be up this late. It works.
-
[1.8] Custom model block rendering in inventory?
I can't seem to find where my mistake is: https://github.com/61352151511/Random-Utilities Relevant files: common/blocks/* proxy/ClientProxy.java RandomUtilities.java Copied your model helper. If you can find my mistake please let me know what it is
-
[1.8] Custom model block rendering in inventory?
Right below it: ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMagicChest.class, mcr); I made it a variable because in 1.7 I needed to use it for the inventory renderer too, however now it doesn't really need to be a variable. The RenderManager is because in the actual block when placed down it renders items. I probably could just use Minecraft.getMinecraft().getRenderManager() in the constructor for it.
-
[1.8] Custom model block rendering in inventory?
In client proxy: @Override public void registerRenderInformation() { TileEntitySpecialRenderer mcr = new MagicChestRenderer(Minecraft.getMinecraft().getRenderManager()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMagicChest.class, mcr); LogHelper.warn("A"); TileEntityItemStackRenderer.instance = new MagicChestInventoryRenderer(); // MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.magicChest), new MagicChestInventoryRenderer(mcr, new TileEntityMagicChest())); } "A" is put into the log public class MagicChestInventoryRenderer extends TileEntityItemStackRenderer { private Map<Integer, TileEntityMagicChest> itemRenders = Maps.newHashMap(); public MagicChestInventoryRenderer() { LogHelper.warn("B"); itemRenders.put(0, (TileEntityMagicChest) new TileEntityMagicChest()); } @Override public void renderByItem(ItemStack itemStack) { Block block = Block.getBlockFromItem(itemStack.getItem()); LogHelper.warn("C"); if (block == ModBlocks.magicChest) { LogHelper.warn("D"); TileEntityRendererDispatcher.instance.renderTileEntityAt(itemRenders.get(0), 0.0D, 0.0D, 0.0D, 0.0F); } else { super.renderByItem(itemStack); } } } "B" is put into the logs "C" and "D" is not put into the logs I do have everything you told me to put
-
[1.8] Custom model block rendering in inventory?
As I said though I can't seem to wrap my head around the ISmartItemModel, IBakedModel, anything like that. I'm sure it's possible to convert public class ModelMagicChest extends ModelBase { public ModelRenderer shape1; public ModelRenderer shape1_1; public ModelRenderer shape1_2; public ModelRenderer shape1_3; public ModelRenderer shape1_4; public ModelRenderer shape1_5; public ModelRenderer shape1_6; public ModelRenderer shape1_7; public ModelMagicChest() { this.textureWidth = 64; this.textureHeight = 64; this.shape1 = new ModelRenderer(this, 0, 17); this.shape1.setRotationPoint(-7.0F, 9.0F, -7.0F); this.shape1.addBox(0.0F, 0.0F, 0.0F, 14, 1, 14, 0.0F); this.shape1_6 = new ModelRenderer(this, 0, 0); this.shape1_6.setRotationPoint(-8.0F, 23.0F, -8.0F); this.shape1_6.addBox(0.0F, 0.0F, 0.0F, 16, 1, 16, 0.0F); this.shape1_5 = new ModelRenderer(this, 0, 48); this.shape1_5.setRotationPoint(-8.0F, 9.0F, -8.0F); this.shape1_5.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); this.shape1_7 = new ModelRenderer(this, 0, 17); this.shape1_7.setRotationPoint(-7.0F, 22.0F, -7.0F); this.shape1_7.addBox(0.0F, 0.0F, 0.0F, 14, 1, 14, 0.0F); this.shape1_2 = new ModelRenderer(this, 0, 0); this.shape1_2.setRotationPoint(-8.0F, 8.0F, -8.0F); this.shape1_2.addBox(0.0F, 0.0F, 0.0F, 16, 1, 16, 0.0F); this.shape1_4 = new ModelRenderer(this, 0, 48); this.shape1_4.setRotationPoint(7.0F, 9.0F, 7.0F); this.shape1_4.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); this.shape1_3 = new ModelRenderer(this, 0, 48); this.shape1_3.setRotationPoint(7.0F, 9.0F, -8.0F); this.shape1_3.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); this.shape1_1 = new ModelRenderer(this, 0, 48); this.shape1_1.setRotationPoint(-8.0F, 9.0F, 7.0F); this.shape1_1.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { this.shape1.render(f5); this.shape1_6.render(f5); this.shape1_5.render(f5); this.shape1_7.render(f5); this.shape1_2.render(f5); this.shape1_4.render(f5); this.shape1_3.render(f5); this.shape1_1.render(f5); } /** This is a helper function from Tabula to set the rotation of model parts */ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } to public class ModelMagicChestRefactor implements ISmartItemModel { @Override public List getFaceQuads(EnumFacing facing) { return null; } @Override public List getGeneralQuads() { return null; } @Override public boolean isAmbientOcclusion() { return false; } @Override public boolean isGui3d() { return false; } @Override public boolean isBuiltInRenderer() { return false; } @Override public TextureAtlasSprite getTexture() { return null; } @Override public ItemCameraTransforms getItemCameraTransforms() { return null; } @Override public IBakedModel handleItemState(ItemStack stack) { return null; } } However I don't understand how any of that works If there's a tutorial specifically for this that explains it in detail I'd love that.
-
[1.8] Custom model block rendering in inventory?
I have no idea how ISmartItemModel works, I know there's a few tutorials but I just can't wrap my head around any of them. I don't jave a .obj model as I said it is a java file, like ModelChest and ModelBanner things like that. If there's a tool to convert those into the json block model format a link would be great. package com.sixonethree.randomutilities.client.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelMagicChest extends ModelBase { public ModelRenderer shape1; public ModelRenderer shape1_1; public ModelRenderer shape1_2; public ModelRenderer shape1_3; public ModelRenderer shape1_4; public ModelRenderer shape1_5; public ModelRenderer shape1_6; public ModelRenderer shape1_7; public ModelMagicChest() { this.textureWidth = 64; this.textureHeight = 64; this.shape1 = new ModelRenderer(this, 0, 17); this.shape1.setRotationPoint(-7.0F, 9.0F, -7.0F); this.shape1.addBox(0.0F, 0.0F, 0.0F, 14, 1, 14, 0.0F); this.shape1_6 = new ModelRenderer(this, 0, 0); this.shape1_6.setRotationPoint(-8.0F, 23.0F, -8.0F); this.shape1_6.addBox(0.0F, 0.0F, 0.0F, 16, 1, 16, 0.0F); this.shape1_5 = new ModelRenderer(this, 0, 48); this.shape1_5.setRotationPoint(-8.0F, 9.0F, -8.0F); this.shape1_5.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); this.shape1_7 = new ModelRenderer(this, 0, 17); this.shape1_7.setRotationPoint(-7.0F, 22.0F, -7.0F); this.shape1_7.addBox(0.0F, 0.0F, 0.0F, 14, 1, 14, 0.0F); this.shape1_2 = new ModelRenderer(this, 0, 0); this.shape1_2.setRotationPoint(-8.0F, 8.0F, -8.0F); this.shape1_2.addBox(0.0F, 0.0F, 0.0F, 16, 1, 16, 0.0F); this.shape1_4 = new ModelRenderer(this, 0, 48); this.shape1_4.setRotationPoint(7.0F, 9.0F, 7.0F); this.shape1_4.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); this.shape1_3 = new ModelRenderer(this, 0, 48); this.shape1_3.setRotationPoint(7.0F, 9.0F, -8.0F); this.shape1_3.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); this.shape1_1 = new ModelRenderer(this, 0, 48); this.shape1_1.setRotationPoint(-8.0F, 9.0F, 7.0F); this.shape1_1.addBox(0.0F, 0.0F, 0.0F, 1, 14, 1, 0.0F); } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { this.shape1.render(f5); this.shape1_6.render(f5); this.shape1_5.render(f5); this.shape1_7.render(f5); this.shape1_2.render(f5); this.shape1_4.render(f5); this.shape1_3.render(f5); this.shape1_1.render(f5); } /** This is a helper function from Tabula to set the rotation of model parts */ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } That's what I use for the actual block, I use a TESR for it and it works fine, however rendering in the inventory it does not.
-
[1.8] Custom model block rendering in inventory?
This is probably answered somewhere, if so a link to it will suffice, I did a few quick searches and found nothing. Basically in 1.7.10 we used IItemRenderer to make custom models render in the inventory, these are models that are just java files (Like the chest) and not json, is there still a way to get these to render in the inventory? MinecraftForgeClient.registerItemRenderer(item, IItemRenderer) still exists however it doesn't seem to work.
-
[1.8] Eclipse: The import cpw cannot be resolved
1.8 all cpw packages were moved to net.minecraftforge If you simply deleted the import and moused over the error it would show you what to import
-
1.7.10 - Help starting to mod for servers
Yes. Really? I got a 1.8 version not long ago and it's easy to set up a dev environment for it. The only thing I think is affected is that they can't put up download links, which is why you need to build the jar yourself. Unless something has changed in the past month or so (I don't keep up to date on it) then it should still work.
-
[1.8] How to get ModelResourceLocation from ItemStack?
Yes that would do just fine, and when it comes to the rendering: this.itemRender.renderItemModel(stack1); this.itemRender.renderItemModel(stack2); this.itemRender.renderItemModel(stack3); this.itemRender.renderItemModel(stack4); Of course you still need to do all the GL transformations, scales, etc to position them correctly. I have no idea how to do that part though In relation to your current code post. In BlockBrick don't have "private static final String __OBFID = "CL_00003555";" That's for vanilla classes only.
-
1.7.10 - Help starting to mod for servers
There's spigot, all you have to do is compile it yourself. It requires git if you're on windows (Unsure about other platforms) Go to the spigot site and there's a thread all about compiling it.
-
[1.8] Block Does Not Have Texture When Placed In World
Nice trouble shooting guide by TheGreyGhost http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html
-
[1.8] How to get ModelResourceLocation from ItemStack?
public RenderShelfItems(RenderManager renderManagerIn, RenderItem renderItemIn[]) { super(renderManagerIn); renderManagerIn.entityRenderMap.put(ShelfTitleEntity.class, new RenderShelfItems(renderManager, null)); for (int i = 0; i<4; i++) { this.itemRenderer[i] = renderItemIn[i]; } } You'll probably only need one instance of the RenderItem, the Item Frame's constructor is: public RenderItemFrame(RenderManager renderManagerIn, RenderItem itemRendererIn) { super(renderManagerIn); this.itemRenderer = itemRendererIn; } It extends Render so you probably want to as well. Just have one instance of the RenderItem and when you call your Render new RenderShelfItems(Minecraft.getMinecraft().getRenderManager, Minecraft.getMinecraft().getRenderItem());
IPS spam blocked by CleanTalk.