• 0

    posted a message on [OPINION] [Immersive Railroading] Best World Gen Mod for Immersive Railroading?

    Hey everybody! For those of you who have used Immersive Railroading, you know that the trains are lifesize, which is awesome! However, the Minecraft terrain doesn't seem to fit the demands of realistic trains. Trains require more flat surfaces or surfaces that don't vary more than a few blocks in height every 50 or 70 blocks.


    So my question is this - without just using a superflat world, what would you recommend or what have you used to modify world gen to make Immersive Railroading more usable? If you haven't used mods, how have you coped with the volatile height changes in Minecraft when trying to run your rail lines?

    Posted in: Mods Discussion
  • 0

    posted a message on PlayerInteractEvent.EntityInteract Only Fires On Server Side

    Hey folks,


    I'm running into a problem with handling this event. The documentation states that the PlayerInteractEvent.EntityInteract event fires on both server side and client side, however, if I am interacting with another mods entity, it only fires on server side. It fires on both if I interact with something like a pig. It also fires properly if I change the Use key binding to not be the right mouse button. What am I doing wrong? I've gone deep into the Minecraft code and found that the Mouse#getEventButtonState method returns false when running the Minecraft#runTickMouse method only when right clicking on a modded entity and I have no idea why.


    Here's my event code:


    @EventBusSubscriber(Side.CLIENT)
    public class EntityIdentifierRenderer {	
    
            @SubscribeEvent
    	public static void playerInteract(PlayerInteractEvent.EntityInteract e)
    	{
    		Class rollingStockClass = null;
    		try {
    			rollingStockClass = Class.forName("cam72cam.immersiverailroading.entity.EntityRollingStock");
    		} catch (ClassNotFoundException e1) {
    			return;
    		}
    		
    		if (!rollingStockClass.isAssignableFrom(e.getTarget().getClass()))
    		{
    			return;
    		}
    		
    		if (!(e.getEntityPlayer().inventory.getCurrentItem().getItem() instanceof ItemRollingStockAssigner))
    		{
    			return;
    		}
    		
    		e.setCanceled(true);
    		if (e.getSide().isServer())
    		{
    			return;
    		}
    		
    		Entity entity = e.getEntity();
    		int x = (int)Math.floor(entity.posX);
    		int y = (int)Math.floor(entity.posY);
    		int z = (int)Math.floor(entity.posZ);
    		
    		e.getEntityPlayer().openGui(ModRailStuff.instance, GuiProxy.GuiIDs.ASSIGN_ROLLING_STOCK, e.getWorld(), x, y, z);
    		
    		PacketGetIdentifierForAssignGUI packet = new PacketGetIdentifierForAssignGUI();
    		packet.id = entity.getPersistentID();
    		
    		PacketHandler.INSTANCE.sendToServer(packet);
    	}
    }


    e.getSide.isServer() always returns true. In debug, I see that it only occurs on the server thread.


    Any thoughts?

    Posted in: Modification Development
  • 1

    posted a message on Traffic Control

    UPDATED

    • New spotlight video to accurately reflect name
    • Link to Files page now active
    • Thread name and mod description updated
    Posted in: Minecraft Mods
  • 0

    posted a message on Traffic Control

    This mod adds the road signs and cones from Killer Mapper's Road Stuff mod! I also added my own railroad crossing and street lights.


    I'm very open to ideas! If there are other cosmetic things that you would like to see in your Minecraft world that are related to roads and traffic, add an issue to this mod and I will take a look! Here's what I've got on the future radar:


    • Custom sized freeway signs
    • Traffic Lights

    Please have fun and enjoy my mod!



    Click here to go to the files page

    Posted in: Minecraft Mods
  • 0

    posted a message on [1.12.2] RoadWorks Reborn

    New mod spotlight video!


    Posted in: Minecraft Mods
  • 0

    posted a message on [RESOLVED] Get rid of shadows around block

    I figured it out! You simply need to override Block#getAmbientOcclusionLightValue and return 1F.

    Posted in: Modification Development
  • 0

    posted a message on [RESOLVED] Compiled Mod throws exception, yet works fine from IDE

    Stack trace, please?

    Posted in: Modification Development
  • 0

    posted a message on How to check for errors when you don't know how to read java?

    I'm 90% sure that the server won't actually start if one of the mods fatally fails to load. The mod will be loaded if the server starts all the way. How different parts of the mod fails is up to the developer of the different mods.


    One thing to look for is that the name of the mod that is giving the error should be in square brackets ( [] )

    Posted in: Modification Development
  • 0

    posted a message on Phantom Light Guidelines

    Hello everyone!


    I was wondering if there was a "best practice" way to setup phantom lighting for light sources you want to not have diminish at 1 unit per block. If you see the screenshots below, I have a street light that appears to be lighting up the area around it. In the second screenshot, I placed sponges where the phantom light blocks actually exist. Of course, if you place something where the light source is, it goes away, but I have written code to replace that block with the phantom light source if you break it. If you already have something in the place of where the phantom light is supposed to be, it will place the phantom light one block above. This could get kind of weird in certain situations, though, depending on who's using it.


    Then I got to thinking of if I should place a bunch of phantom lights in a cone shape from where the overhang of the actual street light is all the way down to the ground. I haven't given this idea much thought, but maybe this is a preferred way to do this?


    I guess what I'm asking is - are there any guidelines on how to do phantom lighting when you want to do something like this? Are there any good, clear examples someone could point me to that shows a good way to setup phantom lighting?


    Thanks!!

    Posted in: Modification Development
  • 0

    posted a message on [RESOLVED] Get rid of shadows around block

    I'll look into doing that, thank you very much!

    Posted in: Modification Development
  • 0

    posted a message on [RESOLVED] Get rid of shadows around block

    Yep, most of my blocks are custom models, so I set isOpaqueCube and isNormalCube to false almost always. It looks like the Block#getRenderType already returns EnumBlockRenderType.MODEL, so setting it like that should not be necessary.

    Posted in: Modification Development
  • 0

    posted a message on [RESOLVED] Get rid of shadows around block

    Hey everybody, I want to get rid of the shadows that are cast by my blocks. See the pic below. Any ideas on how to do this?

    Posted in: Modification Development
  • 0

    posted a message on How exactly do IModel/IBakedModels work?

    Hello all, I'm trying to find a clear-cut tutorial on this stuff, but I can't find any. Maybe I'm not searching hard enough, so if there's something out there, please link it!


    Here's what I'm ultimately trying to do. I have a JSON model with two cubes. This model is used with a TileEntity which has a GUI. I want to change the texture of one of the faces on one of the cubes based on the values in the TileEntity. I could easily do this using a TESR, but I want to avoid that because there's no animation involved here. I'm trying to follow some tutorials but it seems like they're trying to do some stuff that's way beyond what I need, making it hard to see what exactly I need to do here, so here's my question is: at what point are these classes instantiated? When are the overidden methods called? How can I modify the texture on a json model using these overridden methods? Is there an easier way to do this that doesn't require an IModel/IBakedModel implementation? As an example regarding my question about timing of class instantiation, I know a Block is instantiated once and every Block uses the same instance of the class while there is a Tile Entity class instance for each Tile Entity.


    Thanks in advance!

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] [1.12.2] Models Disappear Based On Field Of View

    Hey folks! Finally found a solution! There's a method called TileEntity#getRenderBoundingBox that you can override when you use a TESR like me. You can then specify all the fancy logic in there to expand your render bounding box!


    Here's my implementation in case it helps anyone else:


    	@Override
    	public AxisAlignedBB getRenderBoundingBox() {
    		int width = 1;
    		int height = 1;
    		
    		if (status != EnumStatuses.Open)
    		{
    			width = 4;
    		}
    		
    		if (status != EnumStatuses.Closed)
    		{
    			height = 4;
    		}
    		
    		AxisAlignedBB base = super.getRenderBoundingBox();
    		EnumFacing facing = world.getBlockState(getPos()).getValue(BlockCrossingGateGate.FACING);
    		switch(facing)
    		{
    			case SOUTH:
    				return base.expand(width, height, 0);
    			case EAST:
    				return base.expand(0, height, width * -1);
    			case NORTH:
    				return base.expand(width * -1, height, 0);
    			case WEST:
    				return base.expand(0, height, width);
    		}
    		
    		return super.getRenderBoundingBox();
    	}


    Posted in: Modification Development
  • 0

    posted a message on [1.12.2] RoadWorks Reborn

    Hello everybody! I've updated W. Thieves RoadWorks mod and is available for everyone to enjoy! Please note:

    EXISTING WORLDS USING W.THIEVE'S ROADWORKS WILL NOT CONVERT TO 1.12. YOU WILL LOSE EXISTING WORK IF YOU DO THIS!


    All of the stripes and the tar block are available. Thanks for stopping by!


    Images:




    Click here to go to the Files page

    Posted in: Minecraft Mods
  • To post a comment, please .