Allow optional rider interaction for entities, thanks for the suggestion Vswe.

Updated FML:
MinecraftForge/FML@7af5c21d74 @InstanceFactory was set to look for Fields instead of methods
MinecraftForge/FML@bc9d1fe657 Merge pull request #254 from CaptainShadows/patch-1
This commit is contained in:
Christian committed 2013-07-09 11:23:49 -04:00
1 parent 475918a1ca
commit 561b0fbe55
4 files changed
+25 -17

No files matched your search

+1 -1
Submodule fml updated: d4d522c597...bc9d1fe657.
@@ -12,6 +12,15 @@
@SideOnly(Side.CLIENT)
public class EntityRenderer
{
@@ -319,7 +324,7 @@
if (d3 < d2 || d2 == 0.0D)
{
- if (entity == this.mc.renderViewEntity.ridingEntity)
+ if (entity == this.mc.renderViewEntity.ridingEntity && !entity.canRiderInteract())
{
if (d2 == 0.0D)
{
@@ -354,8 +359,15 @@
*/
private void updateFovModifierHand()
@@ -22,19 +22,7 @@
Iterator iterator = this.field_110574_e.entrySet().iterator();
while (iterator.hasNext())
@@ -73,7 +77,10 @@
try
{
- textureatlassprite.func_130100_a(par1ResourceManager.func_110536_a(resourcelocation1));
+ if (!textureatlassprite.load(par1ResourceManager, resourcelocation1))
+ {
+ continue;
+ }
}
catch (RuntimeException runtimeexception)
{
@@ -142,6 +149,7 @@
@@ -142,6 +146,7 @@
textureatlassprite1 = (TextureAtlasSprite)iterator1.next();
textureatlassprite1.copyFrom(this.missingImage);
}
@@ -42,7 +30,7 @@
}
private void func_110573_f()
@@ -212,6 +220,7 @@
@@ -212,6 +217,7 @@
if (par1Str == null)
{
(new RuntimeException("Don\'t register null!")).printStackTrace();
@@ -50,7 +38,7 @@
}
Object object = (TextureAtlasSprite)this.field_110574_e.get(par1Str);
@@ -253,4 +262,37 @@
@@ -253,4 +259,37 @@
{
this.updateAnimations();
}
@@ -155,7 +155,7 @@
}
public boolean func_96091_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, int par6, float par7)
@@ -2426,4 +2496,149 @@
@@ -2426,4 +2496,160 @@
{
return this.getEntityName();
}
@@ -303,5 +303,16 @@
+ public IExtendedEntityProperties getExtendedProperties(String identifier)
+ {
+ return this.extendedProperties.get(identifier);
+ }
+
+ /**
+ * If a rider of this entity can interact with this entity. Should return true on the
+ * ridden entity if so.
+ *
+ * @return if the entity can be interacted with from a rider
+ */
+ public boolean canRiderInteract()
+ {
+ return false;
+ }
}